package DailyPractice.Day1;

import java.util.Scanner;

/**
 * @author lumin
 * @date 2022/04/17 20:53
 **/
public class Num2 {
    public static void main(String[] args) {
        Scanner sc1 = new Scanner(System.in);
        String s1 = sc1.nextLine();
        String s2 = sc1.nextLine();
        StringBuilder sb = new StringBuilder(s1);
        int i = 0;
        int index = 0;
        while(i < s1.length()){
            int j = 0;
            while(j < s2.length()){
                if(s1.charAt(i) == s2.charAt(j)){
                    sb.deleteCharAt(i - index);
                }
                j++;
            }
            i++;
        }
        System.out.println(sb.toString());
    }
}